<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>My JSP 'updateUser.jsp' starting page</title>
    <script type="text/javascript" src="../../js/include.js"></script>
    <script type="text/javascript">
			function submitForm(){
				if($("#ff").form('validate')==true){
					$.ajax({   
					     url:url+"/system/user/updatePassword",
					     type:$("#ff").attr("method"),   
					     data:$("#ff").serializeArray(),
					     success:function(data){   
					    	 if(data.result=="success"){
					        	$.ajax({   
									url:url+"/logoutJSON",   
									success:function(data){   	
									}
								});
								parent.location.href=htmlURL+"/login.html";
					        }else{
					        	$.messager.alert('提示',data.data);
					        }
					     }
					});
				}
			}
			
			$(function(){
				
				$.ajax({
				     url:url+'/system/user/toUpdatePassword',
				     type:'post',
				     success:function(data){   
				    	 $('#ff').form('load',data.data);
							
				     }
				});
			})

    </script>
</head>

<body>
<form id="ff" method="POST">
    <input type="hidden" id="id" name="id" value="">
    <table>
        <tr>
            <td>
                账号:
            </td>
            <td>
                <input type="text" id="username" name="username" readonly="true" class="easyui-textbox" required="true"
                       validType="length[1,25]">
            </td>
        </tr>
        <tr>
            <td>
                密码:
            </td>
            <td>
                <input type="password" name="password" id="password" class="easyui-textbox" validType="length[0,25]">
            </td>
        </tr>

    </table>
</form>
<div id="dlg-buttons">
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">保存</a>
</div>

</body>
</html>
